#############################################################################
##
##  Warning: Later tests need more than the default memory allocation

#
gap> START_TEST("grpauto.tst");

# assertions test again and again that maps are homomorphisms. This gives
# no extra check but has cost
gap> SetAssertionLevel(0);

#
gap> G:=PcGroupCode(2664057732308087629446918084678644731357911420184737672,
> 6272);;
gap> H:=PcGroupCode(849169324138369034371257796152864931485540637536648, 
> 6272);;
gap> IsomorphismGroups(G,H);
fail
gap> IsomorphismGroups(G,PcGroupCode(CodePcGroup(G),Size(G)))=fail;
false

#
# hard-iso
#
gap> G:=PcGroupCode(589146814442329838036024080610343654876506937853710969\
> 448924603190236492427673556989072961847,11664);;
gap> H:=PcGroupCode(801562094435225650939080918450186172844860829657513982\
> 80193370111859863168020375597783858966368416055,11664);;
gap> IsomorphismGroups(G,H);
fail
gap> IsomorphismGroups(G,PcGroupCode(CodePcGroup(G),Size(G)))=fail;
false

#
# hard-iso2
#
gap> G:=PcGroupCode(409374400436488159632156475187687419052272443300404477\
> 8304456449542618727,11664);;
gap> H:=PcGroupCode(409362703022669659121228158166302826716273465648729361\
> 3630709080224464487,11664);;
gap> K:=PcGroupCode(409374400436488159632788450059215346119864636722303267\
> 1585655861072658023,11664);;
gap> IsomorphismGroups(G,H);
fail
gap> IsomorphismGroups(G,K);
fail
gap> IsomorphismGroups(G,PcGroupCode(CodePcGroup(G),Size(G)))=fail;
false

#
# Many Spaces
#
gap> G:=PcGroupCode(338681823291028181778801710348121147721184790127576437,
> 29160);;
gap> H:=PcGroupCode(338681822494525443798297952136327929199594863010776437,
> 29160);;
gap> IsomorphismGroups(G,H);
fail
gap> IsomorphismGroups(G,PcGroupCode(CodePcGroup(G),Size(G)))=fail;
false

#
gap> G:=PcGroupCode(731609193963915469349479836674438288113664000126400,
> 15744);;
gap> H:=PcGroupCode(11518455149767885147152053318976713124993564672000126400,
> 15744);;
gap> IsomorphismGroups(G,H);
fail
gap> IsomorphismGroups(G,PcGroupCode(CodePcGroup(G),Size(G)))=fail;
false

#
gap> G:=PcGroupCode(18738408935379049727906755356708168311565445686261463850856,
> 21952);;
gap> H:=PcGroupCode(18738408935359210460657231881739776911013615108923450662760,
> 21952);;
gap> IsomorphismGroups(G,H);
fail

#
# Too hard work for permiso
#
gap> G:=Group((1,3,8,21,37,43,36,35)(2,6,15,30,41,29,19,4)(5,7,18,34,46,
> 32,38,25)(9,23,39,28,27,42,12,14)(10,26,17,20,24,33,13,11)(16,31,45,48,
> 44,47,40,22)(50,53)(51,52)(55,56)(57,58), (1,4,11,28,37,30,20,14)
> (2,3,9,24,41,43,27,10)(5,13,26,31,46,17,33,47)(6,16,32,15,29,44,7,19)
> (8,22,38,21,36,48,18,35)(12,23,40,25,39,42,45,34)(49,51)(50,52)(54,55)
> (56,57),(1,2,5,12,26)(3,7,17,6,14)(4,10,25,35,42)(8,20,9,18,15)
> (11,27,38,19,36)(13,29,28,43,32)(21,23,30,24,34)(33,37,41,46,39)
> (49,50,52,51,53));;
gap> Size(AutomorphismGroup(G)); 
2880000

#
# hard-iso4
#
gap> G:=PcGroupCode(
> 741231213963541373679312045151639276850536621925972119311,11664);;
gap> H:=PcGroupCode(
> 888658311993669104086576972570546890038187728096037768975,11664);;
gap> IsomorphismGroups(G,H);
fail
gap> IsomorphismGroups(G,PcGroupCode(CodePcGroup(G),Size(G)))=fail;
false

# Isomorphism tests
gap> gp1:=Group(
> (1,23,6,64,38)(2,42,18,19,11)(3,7,30,49,50)(4,14,20,45,46)(5,9,21,41,58,34, 
> 17,29,48,44)(8,26,40,43,33)(10,22,59,60,32)(12,24,53,74,76)(13,31,55,81,77,
> 61,25,52,75,83)(15,27,51,78,79)(16,28,47,68,71,62,36,56,70,69)(35,57,82,92,
> 91,37,54,80,90,93)(66,72)(85,86)(88,94)(95,96)(97,98,100,102,104)(99,101,
> 103,105,106), (1,32,11,3)(2,10,23,7)(4,15,33,12)(5,13,34,61)(6,38,42,19)(8,
> 27,14,24)(9,25,17,31)(16,35,62,37)(18,63,64,39)(20,46,26,43)(21,44,29,
> 58)(22,60,30,50)(28,54,36,57)(40,67,45,65)(41,66,48,72)(47,69,56,71)(49,84,
> 59,73)(51,79,53,76)(52,77,55,83)(68,85,70,86)(74,89,78,87)(75,88,81,94)(80,
> 91,82,93)(90,95,92,96)(97,98)(99,101)(102,104)(105,106), 
> (4,33)(8,14)(12,15)(16,62)(20,26)(24,27)(28,36)(35,37)(40,45)(43,46)(47,
> 56)(51,53)(54,57)(65,67)(68,70)(69,71)(74,78)(76,79)(80,82)(85,86)(87,
> 89)(90,92)(91,93)(95,96), (1,4)(2,8)(3,12)(5,16)(6,20)(7,24)(9,28)(10,
> 27)(11,33)(13,35)(14,23)(15,32)(17,36)(18,40)(19,43)(21,47)(22,51)(25,
> 54)(26,42)(29,56)(30,53)(31,57)(34,62)(37,61)(38,46)(39,65)(41,68)(44,
> 69)(45,64)(48,70)(49,74)(50,76)(52,80)(55,82)(58,71)(59,78)(60,79)(63,
> 67)(66,85)(72,86)(73,87)(75,90)(77,91)(81,92)(83,93)(84,89)(88,95)(94,96), 
> (1,5)(2,9)(3,13)(4,16)(6,21)(7,25)(8,28)(10,31)(11,34)(12,35)(14,36)(15,
> 37)(17,23)(18,41)(19,44)(20,47)(22,52)(24,54)(26,56)(27,57)(29,42)(30,
> 55)(32,61)(33,62)(38,58)(39,66)(40,68)(43,69)(45,70)(46,71)(48,64)(49,
> 75)(50,77)(51,80)(53,82)(59,81)(60,83)(63,72)(65,85)(67,86)(73,88)(74,
> 90)(76,91)(78,92)(79,93)(84,94)(87,95)(89,96));;
gap> gp2:=Group(
> (4,16)(5,20)(8,14)(9,18)(12,15)(13,39)(23,29)(24,32)(27,30)(28,35)(42,47)(43,
> 50)(45,48)(46,60)(54,56)(55,58)(65,67)(66,72)(74,78)(75,81)(76,79)(77,
> 83)(87,89)(88,94), (1,2,6,21,40,11,26,44,64,22)(3,10,34,61,53,36,7,25,52,
> 62)(4,14,23,47,48)(5,9,24,43,60,20,18,32,50,46)(8,29,42,45,16)(12,27,56,74,
> 76)(13,35,58,81,77,39,28,55,75,83)(15,30,54,78,79)(17,33,49,69,71)(19,31,
> 51,68,70)(37,57,82,90,92)(38,59,80,91,93)(41,63)(66,72)(73,84)(88,94), 
> (1,4,11,16)(2,8,26,14)(3,12,36,15)(5,19,20,17)(6,23,44,29)(7,27,10,30)(9,33,
> 18,31)(13,38,39,37)(21,42,64,47)(22,45,40,48)(24,51,32,49)(25,54,34,56)(28,
> 59,35,57)(41,65,63,67)(43,69,50,68)(46,71,60,70)(52,74,61,78)(53,76,62,
> 79)(55,82,58,80)(66,86,72,85)(73,87,84,89)(75,91,81,90)(77,93,83,92)(88,96,
> 94,95), (1,5)(2,9)(3,13)(4,17)(6,24)(7,28)(8,31)(10,35)(11,20)(12,37)(14,
> 33)(15,38)(16,19)(18,26)(21,43)(22,46)(23,49)(25,55)(27,57)(29,51)(30,
> 59)(32,44)(34,58)(36,39)(40,60)(41,66)(42,68)(45,70)(47,69)(48,71)(50,
> 64)(52,75)(53,77)(54,80)(56,82)(61,81)(62,83)(63,72)(65,85)(67,86)(73,
> 88)(74,90)(76,92)(78,91)(79,93)(84,94)(87,95)(89,96), 
> (1,36,11,3)(2,10,26,7)(4,15,16,12)(5,39,20,13)(6,40,44,22)(8,30,14,27)(9,35,
> 18,28)(17,38,19,37)(21,63,64,41)(23,48,29,45)(24,60,32,46)(25,62,34,53)(31,
> 59,33,57)(42,67,47,65)(43,72,50,66)(49,71,51,70)(52,84,61,73)(54,79,56,
> 76)(55,83,58,77)(68,86,69,85)(74,89,78,87)(75,94,81,88)(80,93,82,92)(90,96,
> 91,95));;
gap> IsomorphismGroups(gp1,gp2)<>fail;
true
gap> gp1:=Group([(1,3,32,2,4,31)(5,6)(7,12,13,8,11,14)
> (9,19,23,10,20,24)(15,22,29,16,21,30)(17,27,26,18,28,
> 25)(33,37,44,36,43,42)(34,40,41,38,39,35)(45,61,66,53,
> 48,59)(46,57,50,58,64,60)(47,49,65,55,54,68)
> (51,67,62,52,56,63)(69,91,75,72,81,93)(70,76,79,80,87,
> 88)(71,77)(73,82,100,78,92,86)(74,99,89,84,96,94)
> (83,90,85,95,98,97),(1,12,32,7,28)(2,11,31,8,27)
> (3,6,13,26,17)(4,5,14,25,18)(9,24,15,20,22)
> (10,23,16,19,21)(33,39,37,38,35)(34,41,36,40,43)
> (45,50,65,49,64)(47,63,59,48,67)(53,60,68,54,57)
> (55,62,66,61,56)(69,87,85,91,90,72,76,97,81,98)
> (70,83,71,93,79,80,95,77,75,88)(73,94,86,82,99,78,89,
> 100,92,96)(74,84),(1,18,31,15)(2,17,32,16)
> (3,13,5,19)(4,14,6,20)(7,30,22,9)(8,29,21,10)
> (11,28,25,24)(12,27,26,23)(33,39)(34,42,38,44)(35,41)
> (36,40)(45,64)(46,68,58,65)(47,67)(48,49,61,54)
> (50,62,60,63)(51,59,52,66)(53,57)(55,56)(69,96,82,78)
> (70,76,75,94)(71,91,90,74)(72,99,92,73)(77,81,98,84)
> (79,97,100,83)(80,87,93,89)(85,86,95,88)]);;
gap> gp2:=Group([(1,6,3)(2,5,4)(7,23,25)(8,24,26)(9,19,31)
> (10,20,32)(11,15,18)(12,16,17)(13,27,22)(14,28,21)
> (33,42,38)(34,36,44)(35,37,39)(40,41,43)(45,48,50)
> (46,65,58)(47,54,63)(49,62,55)(51,67,66)(52,60,56)
> (53,57,61)(59,68,64)(69,83,81,72,74,95)(70,80,73,75,92,
> 79)(71,94,86,76,82,97)(77,87,78,84,88,89)(85,99,98,96,
> 93,91)(90,100),(1,13,2,14)(3,23,4,24)(5,18)(6,17)
> (7,8)(9,25,10,26)(11,20)(12,19)(15,16)(27,31,28,32)
> (34,38)(35,44)(37,40,43,39)(41,42)(45,50)(46,49)(47,63)
> (48,52)(51,57)(53,61)(54,59)(55,62)(56,64,66,58)
> (60,65,67,68)(69,74,72,83)(71,96,76,85)(77,94)(78,91)
> (80,95,92,81)(82,84)(86,97)(87,100,88,90)(89,98)(93,99),
> (1,30,23,26,16)(2,29,24,25,15)(3,14,9,6,18)
> (4,13,10,5,17)(7,22,12,28,19)(8,21,11,27,20)
> (33,38,41,43,44,36,34,35,37,42)(39,40)(46,56,68,49,63)
> (48,61,52,64,67)(50,51,58,60,57)(54,62,59,66,65)
> (69,75,90,86,96,72,70,100,97,85)(71,87,74,94,84,76,88,
> 83,82,77)(73,99,91,81,89,79,93,98,95,78)(80,92)]);;
gap> IsomorphismGroups(gp1,gp2)<>fail;
true
gap> STOP_TEST( "grpauto.tst", 1);
